package factory.factory_method;

public class FactoryPattern {

    public static void main(String[] args) {
        // 纽约披萨店
        NYPizzaStore nyPizzaStore = new NYPizzaStore();

        nyPizzaStore.orderPizza("cheese");
        System.out.println("==========");

        nyPizzaStore.orderPizza("greek");
        System.out.println("==========");

        nyPizzaStore.orderPizza("pepperoni");
        System.out.println("==========");

        nyPizzaStore.orderPizza("clam");
        System.out.println("==========");

        nyPizzaStore.orderPizza("veggie");
        System.out.println("==========");

        // 芝加哥披萨店
        ChicagoPizzaStore chicagoPizzaStore = new ChicagoPizzaStore();

        chicagoPizzaStore.orderPizza("cheese");
        System.out.println("==========");

        chicagoPizzaStore.orderPizza("greek");
        System.out.println("==========");

        chicagoPizzaStore.orderPizza("pepperoni");
        System.out.println("==========");

        chicagoPizzaStore.orderPizza("clam");
        System.out.println("==========");

        chicagoPizzaStore.orderPizza("veggie");
        System.out.println("==========");
    }

}
